Probability
A number that represents the likelihood an event will occur.
\[p(A) = \frac {The \, number \, of \, times \, A \, can \, occur}{The \, total \, number \, of \, possible \, outcomes}\]
Probability
Proportion
If we flip a fair coin, the probability that it lands on heads is 1/2 or 50%.
But if we flip a coin 20 times and count the number of times it lands on heads, lets say 12 times, then our proportion is 12/20 or 60%.
Let’s flip some coins!
A type of probability that deals with the likelihood an event will occur within a finite (limited) possible outcomes.
Binomials
Trials (i.e., an act with an different outcomes) that have exactly two possible outcomes.
Coin flips
Chances of success for a free-throw shooter in basketball, where 1 = a basket made and 0 = a miss.
Binomial probability distribution contains all the possible results over a set of trials and lists the probability of each result.
Criteria
1.) Fixed Trials
2.) Independent Trials
3.) Fixed Probability of Success
4.) Two Mutuallly Exclusive Outcomes
\[ p(x) = \binom{n}{x}p^xq^{n-x}\]
p(x) = probability of x occurring
x = number of successes
n = sample size
p = probability event will occur
q = probability event will not occur
\[\binom{n}{x} = \frac{n!}{x!(n-x)!}\]
n = sample size
x = number of successes
! = factorial
\[q = (p - 1)\]
p = probability event will occur
q = probability event will not occur
Do people prefer Qdoba or Chipotle? Let’s say asked three people what they prefer.
But we are conditioning on order here.
0.5 * 0.5 * 0.5 = 0.125
0.5 * 0.5 * 0.5 = 0.125
0.5 * 0.5 * 0.5 = 0.125
0.125 + 0.125 + 0.125 = ?
Do people choose Qdoba or Chipotle? Let’s say asked 3 people what they prefer (with a probability (p) of 0.50 for choosing Qdoba) - 2 people chose Qdoba and 1 chose Chipotle.
What is the probability that people preferred Qdoba?
\[p(x) = (\frac{n!}{x!(n-x)!})p^x(1-p)^{n-x}\] x = ?
n = ?
p = ?
\[\binom{n}{x} = \frac{n!}{x!(n-x)!}\]
\[\binom{3}{2} = \frac{3!}{2!(3-2)!}\]
\[\frac{6}{2}=3\]
\[ p(x) = (3)p^xq^{n-x}\]
\(p^x\) is the probability that Qdoba was chosen 2 out of 3 times.
\[p(x) = (3)0.5^2(1-p)^{n-x}\]
1.) This is the probability that someone will prefer Chipolte
\[(1 - 0.50) = 0.50\]
2.) This corresponds to the one person that preferred Chipotle
\[(3 - 2) = 1\]
Before simplified:
\[p(x) = (\frac{3!}{2!(3-2)!})0.5^2(1-0.5)^{3-2}\]
Simplified:
\[p(x) = (3)(0.25)(0.5)\]
\[p(x) = 0.375\]
The Binomial Coefficient or ‘n choose k’
\[\binom{n}{x} = \frac{n!}{x!(n-x)!}\]
The Binomial Probability Distribution
\[p(x) = (\frac{n!}{x!(n-x)!})p^x(1-p)^{n-x}\]
Now that we covered the surface of binomial distributions, let’s dig a little deeper, with multiple binomial coefficient calculations.
image: online math learning
Let’s imagine there are 4 Formula-1 races that will occur in June and July, Max Verstappen of Red Bull Racing has a 60% chance of winning.
Assuming that the races are independent of each other, what is the probability that he will win 0 races, 1 race, 2 races, 3 races, or all 4 races?
\[p(x) = (\frac{n!}{x!(n-x)!})p^x(1-p)^{n-x}\]
What do we know?
n = 4 races
x = He will win: 0, 1, 2, 3, 4 races
p = 0.60
Calculate ‘n choose x’ for each x
0 \(\binom{4}{0} = \frac{4!}{0!(4-0)!} = 1\)
1 \(\binom{4}{1} = \frac{4!}{1!(4-1)!} = 4\)
2 \(\binom{4}{2} = \frac{4!}{2!(4-2)!} = 6\)
3 \(\binom{4}{3} = \frac{4!}{3!(4-3)!} = 4\)
4 \(\binom{4}{4} = \frac{4!}{4!(4-4)!} = 1\)
\[\binom{n}{x} = \frac{n!}{x!(n-x)!}\]
Plug in and solve the rest
\((1)0.60^0(1-0.60)^{4-0} = 0.0256\)
\((4)0.60^1(1-0.60)^{4-1} = 0.1536\)
\((6)0.60^2(1-0.60)^{4-2} = 0.3456\)
\((4)0.60^3(1-0.60)^{4-3} = 0.3456\)
\((1)0.60^4(1-0.60)^{4-4} = 0.1296\)
\[(Step\,2)\,p^xq^{n-x}\]
Summarize the result
Max Verstappen has a …
2.56% chance to win 0 races.
15.36% chance to win 1 races.
34.56% chance to win 2 races.
34.56% chance to win 3 races.
12.96% chance to win 4 races.
Image: NBC Sports
Sometimes our distribution can have a lot of variance and thus can result in varying levels of kurtosis.
To compensate for this, we can standardize our scores by apply a z-score.
image: Math is fun
Tells you how many standard deviations a specific point is away from the mean of a distribution.
Positive z-score: A positive z-score indicates that the value (x) lies above the mean by a certain number of standard deviations.
Negative z-score: A negative z-score indicates that the value (x) lies below the mean by a certain number of standard deviations.
Zero z-score: A z-score of 0 means the value (x) is exactly equal to the mean of the data set.
\[z = \frac{x - \bar{x}}{\sigma}\]
\(x\) = Raw score
\({\bar{x}}\) = Sample mean
\({\sigma}\) = Standard deviation
Imagine you have a class of 20 students and you give them a math test. The mean was 75 points, and the standard deviation (SD) is (+/-) 10 points.
One student scored 88 points on the test. Calculate the z-score for the student.
\[z = \frac{x - \bar{x}}{\sigma}\]
\[z = \frac{88 - 75}{10}\] \[z = 1.30 \]
The score is 1.30 standard deviations above the mean.
In other words, the student preformed better than 1.30 standard deviations compared to the average score in the class.
giphy